import 'package:intl/intl.dart';

class NumUtils {
  /// 格式化数字
  static String formatNum(num? num, {String format = '#.##'}) {
    if (num == null) {
      return '0';
    }
    NumberFormat numberFormat = NumberFormat(format);
    return numberFormat.format(num);
  }
}
